import cv2
import numpy
img = cv2.imread('1.jpeg')
px = img[100,100]
#if pix is RGB,print RGB 
print(px)
blue = img[100,100,0]
#if pix is gray,print gray
print(blue)
img[100,100] = [255,255,255]
print(img[100,100])

print(img.item(100,100,2))
img.itemset((100,100,2),100)
print(img.item(100,100,2))
